const rightService = require("../service/rightService")
const {dataHandler} = require('../utils/handle-data')

class RightController {
  async getRightList(ctx, next) {
    const { type } = ctx.params 
    const res = await rightService.getRightList()
    const data = dataHandler(res,type)
    ctx.body = {
      data,
      meta:{
        msg: '获取权限列表成功',
        status:200   
      }
    }
  }
}
module.exports = new RightController()